|
Loop splitting is a compiler optimization technique. It attempts to simplify a loop or eliminate dependencies by breaking it into multiple loops which have the same bodies but iterate over different contiguous portions of the index range. ==Loop peeling== Loop peeling is a special case of loop splitting which splits any problematic first (or last) few iterations from the loop and performs them outside of the loop body. Suppose a loop was written like this: Notice that p = 10 only for the first iteration, and for all other iterations, p = i - 1 . A compiler can take advantage of this by unwinding (or "peeling") the first iteration from the loop.After peeling the first iteration, the code would look like this: This equivalent form eliminates the need for the variable p inside the loop body.Loop peeling was introduced in gcc in version 3.4. 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「Loop splitting」の詳細全文を読む スポンサード リンク
|